<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <title>bdep-projects-configs(1) bdep 0.17.0</title>

  <style type="text/css">
/* file      : common.css
 * license   : MIT; see accompanying LICENSE file
 */

html
{
  font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
  font-weight: normal;
  font-size: 18px;
  line-height: 1.4em;
  letter-spacing: 0.01em;

  color: #292929;
}

body {margin: 0;} /* There is non-0 default margin for body. */

/* See notes on what's going on here. */
body {min-width: 17em;}
@media only screen and (min-width: 360px)
{
  body {min-width: 19em;}
}

/*
 * Header (optional).
 */

#header-bar
{
  width: 100%;

  background: rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);

  padding: .4em 0 .42em 0;
  margin: 0 0 1.4em 0;
}

#header
{
  /* Same as in #content. */
  max-width: 41em;
  margin: 0 auto 0 auto;
  padding: 0 .4em 0 .4em;

  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

  width: 100%;
  display: table;
  border: none;
  border-collapse: collapse;
}

#header-logo, #header-menu
{
  display: table-cell;
  border: none;
  padding: 0;
  vertical-align: middle;
}

#header-logo {text-align: left;}
#header-menu {text-align: right;}

/* These overlap with #header's margin because of border collapsing. */
#header-logo {padding-left: .4em;}
#header-menu {padding-right: .4em;}

#header-logo a
{
  color: #000;
  text-decoration: none;
  outline: none;
}
#header-logo a:visited {color: #000;}
#header-logo a:hover, #header-logo a:active {color: #000;}

#header-menu a
{
  font-size: 0.889em;
  line-height: 1.4em;
  text-align: right;
  margin-left: 1.2em;
  white-space: nowrap;
  letter-spacing: 0;
}

#header-menu a
{
  color: #000;
  outline: none;
}
#header-menu a:visited {color: #000;}
#header-menu a:hover, #header-menu a:active
{
  color: #3870c0;
  text-decoration: none;
}

/* Flexbox-based improvements though the above works reasonably well. */
#header-menu-body
{
  width: 100%;

  display: -webkit-inline-flex;
  display: inline-flex;

  -webkit-flex-flow: row wrap;
  flex-flow: row wrap;

  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

/* Whether we want it (and at which point) depends on the size of the menu. */
/*
@media only screen and (max-width: 567px)
{
  #header-menu-body
  {
    -webkit-flex-direction: column;
    flex-direction: column;
  }
}
*/

/*
 * Content.
 */

#content
{
  max-width: 41em;
  margin: 0 auto 0 auto;
  padding: 0 .4em 0 .4em; /* Space between text and browser frame. */

  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/*
 * Footer (optional).
 */

#footer
{
  color: #767676;
  font-size: 0.7223em;
  line-height: 1.3em;
  margin: 2.2em 0 1em 0;
  text-align: center;
}

#footer a
{
  color: #767676;
  text-decoration: underline;
}
#footer a:visited {color: #767676;}
#footer a:hover, #footer a:active {color: #3870c0;}

/* Screen size indicator in the footer. The before/after content is in case
   we don't have any content in the footer. Margin is to actually see the
   border separate from the browser frame. */

/*
#footer:before {content: "\A0";}
#footer:after {content: "\A0";}

#footer
{
  border-left: 1px solid;
  border-right: 1px solid;
  margin-left: 1px;
  margin-right: 1px;
}

@media only screen and (max-width: 359px)
{
  #footer {border-color: red;}
}

@media only screen and (min-width: 360px) and (max-width: 567px)
{
  #footer {border-color: orange;}
}

@media only screen and (min-width: 568px) and (max-width: 1023px)
{
  #footer {border-color: blue;}
}

@media only screen and (min-width: 1024px)
{
  #footer {border-color: green;}
}
*/

/*
 * Common elements.
 */

p, li, dd {text-align: justify;}
.code {text-align: left;} /* Manually aligned. */
pre {text-align: left;}   /* If it is inside li/dd. */

/* Notes. */

.note
{
  color: #606060;
}

div.note
{
  margin: 2em 0 2em 0; /* The same top/bottom margings as pre box. */

  padding-left: 0.5em;
  border: 0.25em;
  border-left-style: solid;
  border-color: #808080;

  page-break-inside: avoid;
}

div.note :first-child {margin-top:    0;}
div.note :last-child  {margin-bottom: 0;}

span.note::before {content: "[Note: "}
span.note::after  {content: "]"}

/* Links. */
a
{
  color: #3870c0;
  /*color: #4078c0;*/
  text-decoration: none;
}

a:hover, a:active
{
/*color: #006fbf;*/
/*color: #0087e7;*/
  text-decoration: underline;
}

a:visited
{
/*color: #003388;*/
  color: #00409c;
}

/* Standard paragraph. */

p, pre {margin: 1em 0 1em 0;}

/* Standard lists. */
ul, ol, dl {margin: 1em 0 1em 0;}
ul li, ol li {margin: 0 0 .4em 0;}
ul li {list-style-type: circle;}
dl dt {margin: 0 0 0 0;}
dl dd {margin: 0 0 .6em 1.8em;}

code, pre
{
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.92em;
  letter-spacing: 0;
}

pre {white-space: pre-wrap;}
@media only screen and (max-width: 567px)
{
  pre {word-break: break-all;}
}

/* Use page rather than system font settings. */
input
{
  font-family: inherit;
  font-weight: inherit;
  font-size:   inherit;
  line-height: inherit;
}

/* file      : pre-box.css
 * license   : MIT; see accompanying LICENSE file
 */

/* Note: see also p-code-box.css. */

pre
{
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 0.2em;
  padding: .8em .4em .8em .4em;
  margin: 2em -.4em 2em -.4em; /* Use margins of #content. */
}

/* file      : man.css
 * license   : MIT; see accompanying LICENSE file
 */

/* Bases:
 *
 * common.css
 * pre-box.css
 *
 */

#content
{
  max-width: 42.1em;
  padding-left: 1.5em; /* Reserve for the heading. */
}

h1
{
  font-weight: normal;
  font-size: 1.58em;
  line-height: 1.4em;
  margin: 1.6em 0 .6em -.88em;
}

/* Definition list for options. */
dl.options dt {margin: 1em 0 0 0;}
dl.options dd {margin: .1em 0 0 4.5em;}

/* Make lists inside option descriptions a tad smaller. */
dl.options dd ul, dl.options dd ol, dl.options dd dl
{
  font-size: 0.889em;
  line-height: 1.4em;
}

  </style>

</head>
<body>
<div id="content">

  <h1>NAME</h1>

  <p><b><code>bdep-projects-configs</code></b> &#8211; specifying projects and configurations</p>
  <h1>SYNOPSIS</h1>

  <p class="code"><code><b>bdep</b> <i>command</i> [<i>pkg-spec</i>]
  [<i>cfg-spec</i>] ...</code></p>

  <p class="code"><code><i>cfg-spec</i> = (<b>@</b><i>cfg-name</i> |
  <b>--config</b>|<b>-c</b> <i>cfg-dir</i>)... | <b>--all</b>|<b>-a</b>
  <br/>
  <i>pkg-spec</i> = (<b>--directory</b>|<b>-d</b> <i>pkg-dir</i>)... |
  <i>prj-spec</i>
  <br/>
  <i>prj-spec</i> = <b>--directory</b>|<b>-d</b> <i>prj-dir</i></code></p>

  <h1>DESCRIPTION</h1>

  <p>Most <code><b>bdep</b></code> commands operate on a project or some of
  its packages as well as its build configurations. For example,
  <code><b>status</b></code> (<a
  href="bdep-status.xhtml"><code><b>bdep-status(1)</b></code></a>) shows the
  status of one or more project packages in one or more build configurations.
  While <code><b>fetch</b></code> (<a
  href="bdep-fetch.xhtml"><code><b>bdep-fetch(1)</b></code></a>) fetches the
  list of available to the project dependency packages, again, in one or more
  build configurations.</p>

  <p>Without any <code><b>--directory</b>|<b>-d</b></code> options specified,
  the current working directory is assumed to be either the project root
  directory, the package root directory, or one of the package subdirectories.
  This is the common <code><b>bdep</b></code> usage mode where you run it from
  within your project's source code directories, similar to version control
  tools such as <code><b>git(1)</b></code>.</p>

  <p>Alternatively, the project or (several) package directories can be
  specified with the <code><b>--directory</b>|<b>-d</b></code> options. Note
  that <code><b>bdep</b></code> operates on a single project but potentially
  multiple packages belonging to said project at a time.</p>

  <p>Some <code><b>bdep</b></code> commands, such as
  <code><b>fetch</b></code>, operate on the whole project. If such a command
  is given a package directory (either as the working directory or with
  <code><b>--directory</b>|<b>-d</b></code>), then it automatically determines
  its project directory and uses that.</p>

  <p>Other commands, such as <code><b>status</b></code>, operate on one or
  more packages. If such a command is given a project directory, then it
  automatically determines the list of packages belonging to this project and
  uses that. Note that what exactly <i>belonging</i> means is
  command-specific. For most commands it means all the packages initialized in
  a given build configuration. For <code><b>init</b></code> (<a
  href="bdep-init.xhtml"><code><b>bdep-init(1)</b></code></a>), however, it
  means all the packages available in the project (for example, as listed in
  <code><b>packages.manifest</b></code>).</p>

  <p>A project managed by <code><b>bdep</b></code> has one or more associated
  build configurations (see <a
  href="bdep-config.xhtml"><code><b>bdep-config(1)</b></code></a> for
  details). Some of these configurations, one per the configuration type, can
  be designated as default and used if no configuration is specified
  explicitly. So, for example, running <code><b>status</b></code> without any
  arguments in the project directory will show the status of all the project
  packages initialized in the default configurations.</p>

  <p>An associated build configuration can be assigned a name in which case we
  can specify it using the <code><b>@</b><i>cfg-name</i></code> notation. For
  example:</p>

  <pre>$ bdep status @gcc @clang</pre>

  <p>Note to Windows users: a command line argument with leading
  <code><b>@</b></code> has a special meaning in PowerShell. To work around
  this, you can use the alternative <code><b>-@gcc</b></code> syntax or the
  <code><b>-n&#160;gcc</b></code> option.</p>

  <p>A configuration without a name can be specified as a directory using the
  <code><b>--config</b>|<b>-c</b></code> option. Name and directory
  specifications can be mixed. For example:</p>

  <pre>$ bdep status @gcc -c ../builds/clang</pre>

  <p>Finally, we can use the <code><b>--all</b>|<b>-a</b></code> option to
  specify all the build configurations associated with the project.</p>

  <h1>BUGS</h1>

  <p>Send bug reports to the
  <a href="mailto:users@build2.org">users@build2.org</a> mailing list.</p>

</div>

<div id="footer">
Copyright &#169; 2014-2024 the build2 authors.<br/>
Permission is granted to copy, distribute and/or modify this document under
the terms of the MIT License.
</div>

</body>
</html>
